home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
comm
/
async.zip
/
TSR.DOC
< prev
Wrap
Text File
|
1986-09-07
|
15KB
|
334 lines
****************************************************************
* Version 2.1 *
* The TSR package is a group of programs useful in managing *
* DOS memory, and in particular managing memory-resident *
* utilities. TSR stands for "Terminate and Stay Resident". *
* *
****************************************************************
A. MARK, FMARK and RELEASE
================================================================
MARK.COM and RELEASE.COM are used to remove memory-resident
programs from memory, without requiring a system reboot, and
without the usual problems of creating holes or leaving
interrupts dangling. The two programs are used simply as follows:
1) Run the program MARK.COM before installing any memory-
resident program that you may wish to deinstall later.
This marks the current position in memory and stores the
DOS interrupt vector table (all interrupts from 0 to FFH).
2) Install whatever TSRs that you want to use, in the normal
way that you install them.
3) When you want to deinstall all TSRs above the last MARK,
run the program RELEASE.COM. This will release all of the
memory above (and including) the last MARK, and restore
all interrupt vectors taken over by the memory resident
programs.
MARK and RELEASE can be "stacked" as many times as desired.
RELEASE releases the memory above the last MARK call. MARK uses
about 1600 bytes of memory each time it is called. This 1600
byte region is also released when a RELEASE is done. MARK memory
usage is dominated by the copies of the DOS interrupt vector
table (interrupts 0..FFH) and the copy of the EMS page map
(blocks 0..31 only) which MARK keeps when it goes resident.
================================================================
MARK and RELEASE can optionally be called with a single command
line parameter:
MARK MarkName
RELEASE MarkName
In this way a particular mark is given a name. Calling RELEASE
with the same name will release all memory above and including
the mark of that name, also releasing any intermediate marks in
the process. If no mark of the proper name is found, RELEASE
will halt with a warning. A RELEASE call with no MarkName
specified will release the last MARK, whether or not that MARK
was named.
The MarkName can be any text string up to 126 characters in
length. It may not contain embedded blanks or tabs. Case (upper
or lower) is not important when matching MarkNames.
MarkName supports an additional feature. If the MarkName begins
with ! (exclamation point), then the mark is called a "protected
mark". That mark can be released *only* by an exact match to its
name (including the exclamation point). A protected mark will
NOT be released with an "unnamed" RELEASE. Any named or unnamed
RELEASE will stop without releasing any blocks if it encounters
a protected mark that it does not match exactly.
================================================================
As of version 1.4, MARK and RELEASE also control Expanded memory
(Lotus/Intel/Microsoft EMS). They have been tested with READY!
and with the TurboPower Software expanded memory disk cache, as
well as with the device drivers used by the STB Expanded Memory
Card.
WARNING: if a resident application allocates expanded memory at
some time *after* going resident and after the last MARK made,
that expanded memory will be released by a call to RELEASE. The
current expanded memory manager (EMM) does not give us enough
information to avoid this possibility. Fortunately, there are no
known memory resident programs which perform this dynamic
allocation of expanded memory. We hope that the EMM will be
upgraded before such applications are designed.
================================================================
As of version 1.6, RELEASE takes special precautions to allow it
to release extra invocations of the DOS command processor. In
the simplest form, an extra command processor is obtained by
typing COMMAND at the DOS level. Many multitasking or switching
utilities also utilize this feature of DOS, and these utilities
can now be managed via MARK and RELEASE.
================================================================
Due to the way DOS handles batch files, there are certain
limitations on using RELEASE within batch. It is *not* possible
to perform the following sequence of events successfully:
First, from the command line:
MARK
SK {or any other resident program or programs}
Then, within a batch file:
RELEASE {get rid of SK and MARK}
LOTUS {run Lotus using the additional memory}
MARK {put SK back in place}
SK
DOS allocates a small memory block prior to running any batch
file. It does not allow that block to be deallocated from within
the batch file without various errors occurring. As a result, in
this case the MARK and SK memory blocks are effectively trapped
until the batch file is completed, after which the memory will
be reusable. Indeed, if you run the batch file presented above,
you will get MARK and SK installed above a big hole in memory
left by the previous images of MARK and SK.
As of version 1.9, RELEASE guards against this possibility. If
it senses that you are attempting to release memory trapped by a
"batch control block", it writes a warning message to that
effect. It still releases the memory, but when it exits it
passes back a return code of 1 rather than the usual value of 0.
It *is* possible to get the desired effect in either of at least
two ways. First, you could make two batch files and call them
one after the other:
Batch file #1:
RELEASE
Batch file #2:
LOTUS
MARK
SK
In this case, running RELEASE in batch file #1 has the same
effect as running RELEASE from the command line. However,
directly calling the second batch file from the first doesn't
always seem to work either. The only sure bet appears to be the
use of a keypoker like KEY-FAKE or PCED's KEYIN, modifying Batch
#1 as follows:
RELEASE
KEY-FAKE "batch2" 13
A better way to make these things happen is to use the public
domain program CED, or its commercial upgrade PCED. These
programs allow you to define "synonyms" for groups of commands.
The commands execute one after the other just like a batch file.
However, the synonyms do not create an extra batch control
memory block which causes the problems just described.
Thus you could make two CED synonyms as follows. (We assume that
the CED "chain character" is ^).
SYN LOADSK mark !sk^sk
{make a protected sidekick marker and load sidekick}
SYN RUNLOT release !sk^lotus^mark !sk^sk
{release sidekick if it's there, run lotus, then reload sidekick}
================================================================
As of version 2.0, a new form of marking, called a "file
mark", is also supported. The new mark has the advantage that it
uses only about 150 bytes of memory rather than the 1600 of MARK.
The new mark is placed with the command
FMARK [d:][directory]filename
The bulk of the vector table and EMS page map are stored in the
file which you specify on the command line rather than in
memory. Note that a command line parameter is *required* in this
case. Otherwise FMARK will halt with an error. The file created
by FMARK will be between 1000 and 2000 bytes in size, depending
on usage of expanded memory.
If you might switch drives or directories after using FMARK, you
should specify a complete pathname when FMARK is initially
called. To avoid confusion, you may want to keep the FMARK files
in the root directory, or in a separate directory defined just
for this purpose.
The RELEASE program has been upgraded so that it can release
either an in-memory mark (placed by MARK.COM) or a file mark
(placed by FMARK.COM). Use of RELEASE with in-memory marks is
the same as before. To use RELEASE with file marks, call it with
the name of the mark file on the command line:
RELEASE [d:]